package com.jt.sys.controller;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jt.common.vo.JsonResult;
import com.jt.common.vo.PageObject;
import com.jt.sys.entity.SysLog;
import com.jt.sys.service.SysLogService;

@Controller
@RequestMapping("/log/")
public class SysLogController {
	@Autowired
	private SysLogService sysLogService;
	@RequestMapping("doLogListUI")
	public String doLogListUI(){
		return "sys/log_list";
	}
	@RequestMapping("doFindPageObjects")
	@ResponseBody
	@RequiresPermissions("sys:log:view")
	public JsonResult doFindPageObjects(String username,
			Integer pageCurrent){
		PageObject<SysLog> pageObj = sysLogService.findPageObjects(pageCurrent, username);
		return new JsonResult(pageObj);
	}
}
